package tech.threekilogram.contenttransitiontest;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.ActivityOptionsCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

/**
 * @author liujin
 */
public class ShareElementActivity extends AppCompatActivity {

      public static void start ( Context context, View view, String transitionName ) {

            Intent starter = new Intent( context, ShareElementActivity.class );
            context.startActivity(
                starter,
                ActivityOptionsCompat
                    .makeSceneTransitionAnimation( (Activity) context, view, transitionName )
                    .toBundle()
            );
      }

      @Override
      protected void onCreate ( Bundle savedInstanceState ) {

            super.onCreate( savedInstanceState );
            setContentView( R.layout.activity_share_element );
      }
}